#ifndef ASHMEM_H
#define ASHMEM_H

#include <stddef.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/ioctl.h>
#include <fcntl.h>
#include <memory.h>
#include "uapi_ashmem.h"

typedef unsigned int __u32;
#define ASHMEM_DEVICE	"/dev/ashmem"

#ifdef __cplusplus
extern "C"{
#endif

int ashmem_create_region(const char *name, size_t size);

int ashmem_set_prot_region(int fd, int prot);

int ashmem_pin_region(int fd, size_t offset, size_t len);

int ashmem_unpin_region(int fd, size_t offset, size_t len);

int ashmem_get_size_region(int fd);

#ifdef __cplusplus
};
#endif
#endif
